<template>
  <div class="app-container">
    <!-- 课程学习 -->
    
    <div class="backgroundClass">
      <courseware
        styleCss="height:100%;"
        :croueid.sync="croueid"
        :tabLabel="tabLabel"
        :activeNameA="activeNameA"
        ref="courseware"
      >
      <template>
        <el-radio-group v-model="activeNameA">
          <el-radio-button style="margin-bottom: 12px" label="全部"
            >全部课程</el-radio-button
          >
          <el-radio-button style="margin-bottom: 12px" label="视频"
            >视频课程</el-radio-button
          >
          <el-radio-button style="margin-bottom: 12px" label="课件"
            >电子课件</el-radio-button
          >
          <el-radio-button style="margin-bottom: 12px" label="收藏"
            >收藏课件</el-radio-button
          >
        </el-radio-group>
      </template>
    </courseware>
    </div>
    <div class="backgroundClass" style="margin-top: 24px">
      <pickList
        :idSad="croueid"
        :tabLabel="tabLabel"
        :activeName="activeNameA"
        ref="pickList"
      ></pickList>
    </div>
  </div>
</template>

<script>
import courseware from "../admin/components";
import pickList from "../admin/components/pickList";
export default {
  data() {
    return {
      croueid: "",
      tabLabel: "理论",
      title: "全部",
      activeNameA:'全部',
    };
  },
  watch: {
    // activeNameA(val) {
    //   if (this.croueid) {
    //     this.$refs.pickList.listData(this.croueid,);
    //   }
    // },
  },
  components: {
    courseware,
    pickList,
  },
  created() {
    this.activeNameA = '全部';
    if (Object.keys(this.$route.params).length != 0) {
      this.croueid = this.$route.params.id;
    }
    if (Object.keys(this.$route.query).length != 0) {
      this.croueid = this.$route.query.subjct;
    }
  },
  mounted() {
    if (this.croueid) {
      this.$refs.courseware.listdata();
      this.$refs.pickList.listData(this.croueid,);
    }else{
      this.$refs.courseware.listdata();
    }
  },
};
</script>

<style lang="scss" scoped>
@import "~@/styles/utis.scss";
.app-container {
  height: calc(100vh - 50px) !important;
  overflow: auto;
}
.backgroundClass {
  // height:100%;
  overflow: auto;
}
.titleBox {
  display: flex;
  min-width: 500px;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 24px;
}
</style>
<style lang="scss" scoped>
::v-deep {
  .el-input-group__append {
    background: none !important;
    border-color: none;
    color: #3b7cff !important;
  }
  .el-tabs__content {
    height: calc(100% - 55px);
    .el-tab-pane {
      height: 100%;
    }
  }
  .el-radio-button {
    margin-bottom: 20px !important;
    margin-right: 30px !important;
    .el-radio-button__inner {
      border: none !important;
      border-radius: 4px;
      padding: 10px 0;
    }
  }
  .el-radio-button__orig-radio:checked + .el-radio-button__inner {
    border-radius: 4px;
    border: none !important;
    background: none !important;
    color: #3b7cff;
    box-shadow: none !important;
  }
}
</style>